Computers are often used to store and process data. Computer users usually use an application program to store a particular kind of data, or to process data in a particular way. A particular type of application program, called a database application, permits users to store and process a body of related data in the form of a table. A table is composed of records, each containing data about a particular thing, such as a mechanical part needed to construct a go-cart. Each record corresponds to one "line" of data, and a line is terminated by an end-of-line character, such as a return or line feed character. Each record is divided into a set of fields, or particular pieces of data. The set of fields is the same for every record in the table. Example fields for part records include part number, part description, and part cost. A record in such table would contain the part number, part description, and part cost for a particular part. Fields usually also have a uniform length, measured in number of characters, in every record.
FIG. 1 is a diagram showing the contents of an example table. The table 100 contains twenty records 101-120, each specifying data for each of seven fields 131-137. The fields are a stock number field 131, a description field 132, a quantity required field 133, a responsible mechanic field 134, an item cost field 135, a total cost field 136, and a date required field 137. In order to construct a go-cart, two axles, stock number 663661, which cost $215 each, are needed by Sue by Dec. 16, 1993, at a total cost of $430.00. Accordingly, the stock number field for record 113 contains the stock number "663661", the description field contains the description "axles", the quantity required field contains the quantity "2", the responsible mechanic field contains the name "Sue", the item cost field contains the item cost "$215.00", the total cost field contains the total cost "$430.00", and the date required field contains the date "12/16/93". These field contents would typically have been stored in the table after being inputted by a user. A user typically positions an insert cursor to a particular field and types the data the field is to contain, then instructs the database application to move the input cursor to another field using a next field key, such as the tab key.
Some database applications store table data in fixed-width field format, in which the contents of every field of each record are stored together in a string of text, and the fields are delineated by absolute position within the string. Text includes alphabetic, numeric and other characters. FIG. 2 is a diagram of the information shown in the table FIG. 1 stored as text strings. The figure shows character position numbers 201, also called column numbers, above the text strings. The first seven characters of each string contains the contents of the stock number field, the eighth through twenty-ninth character contains the contents of the description field, etc. Field width information is often stored separately from the table data, and is therefore sometimes unavailable to other application programs, such as other database applications or spreadsheet applications, when reading the table data.
When a spreadsheet or database application reads a text file containing a table in fixed-width field format for which field width information is not available, it must position field breaks within the table data. Typically, spreadsheet and database applications use one of two methods to position field breaks in such data. In a first manual method, the application program solicits the necessary information from the user, either by interactively inputting the width of each field, or by inputting a control string containing information about every field, including width. This method has the shortcoming that it requires the user to provide width information that is likely both outside of the user's knowledge and difficult to determine manually.
A second single row analysis method automatically analyzes the text in a single record, usually the first, or topmost record. This usually involves positioning a field break at every location at which the analyzed record contains a non-substantive character, such as a space, that follows a substantive character, such as a letter. This method has the shortcoming of often incorrectly positioning field breaks, since a single record is seldom representative of the entire table. FIG. 3 is an example of how the single row analysis method of positioning field breaks would position field breaks in the strings of text shown in FIG. 2. The diagram shows field breaks 301-304. It can be readily seen that, because of idiogyncrasies of the first record, field breaks 302, 303, and 304 have all been positioned improperly: each is positioned within a field, rather than between two fields.